package com.demo.enums;

public enum GlobalMessageBanCiEnum {
    ZHEGN_CHANG(1, "正常"),
    ZHI_BAN(2, "值班");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    GlobalMessageBanCiEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static GlobalMessageBanCiEnum getByValue(Integer value) {
        for (GlobalMessageBanCiEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
